I am using Next.js and I got this error.This is the code:
import React from "react";
import { Container, Col, Row } from "react-bootstrap";
import Image from "next/image";
export default function fs() {
return (
<div>
<Container>
<Row>
<Col lg="4" md="4">
<Row>test</Row>
<Row>test</Row>
<Row>test</Row>
</Col>
<Col lg="4" md="4">
<Image width="100%" height="50" src="/images/crown.png" />
</Col>
<Col lg="4" md="4">
</Col>
</Row>
</Container>
</div>
);
}
and after reviewing the code many times I've found that the images folder can't exist in the 'styles' folder , it should be in the 'public' folder (apparently this is how Next.js architecture works !).
according to Next.js architecture, there should be a folder called 'public'.You should put the images used in the app there, and not in any other folder like 'styles'.